<div id="OS_corp_root">
    <div id="OS_header">
<!--        <div class="OS_titlu_dyn">oferte <b>speciale</b></div>-->
        <?php $query = mysql_query("select * from dt_modules where `type`='ofertespeciale' and `m_visible`='1' and `m_id` ='".$dRow['m_id']."'");
            while ($qrow = mysql_fetch_array($query)){
                $s = explode("/", $qrow['m_title']);
                echo '<div class="OS_titlu_dyn">
                    <a href="categories/3/oferte_speciale.html">
                    <b>'.$s[0].'</b> '.$s[1].'
                        </a></div>';}?></div>
    </div>
        <div id="OS_content">
            <table cellpadding="0" cellspacing="0" width="100%" border="0">
            <?php
            $q3 = mysql_query("select * from dt_oferte_speciale where m_id = '".$dRow['m_id']."'");
            while ($q3row = mysql_fetch_array($q3)){
                $q4 = mysql_query("select * from dt_offers where o_id = '".$q3row['o_id']."'");
                while ($q4row = mysql_fetch_array($q4)){
                    echo '<tr>';
                    echo '<td class="OS_col_text" valign="top">';

                    echo '<a class="OS_link_var" href="offers/'.$q4row['c_id'].'/'.$q4row['o_id'].'/'.cleanitup($q4row['o_title']).'.html">'.$q4row['o_label'].'.</a>';
                    echo '<a class="link_vaca" href="offers/'.$q4row['c_id'].'/'.$q4row['o_id'].'/'.cleanitup($q4row['o_title']).'.html">'.limitclear($q4row['o_small_desc'], 100).'...</a>';
                    echo '<br/><br/>';
                    echo '</td>';
                    echo '<td class="OS_col_pic" valign="top">';

                    $photos = mysql_query("select * from dt_offers_photos where o_id = '".$q4row['o_id']."'");
                    $photoRow = mysql_fetch_array($photos);

                    if ($photoRow['oImg_file'] != ''){
                        echo '<div class="OS_pic_holder">';
                        if (!empty ($q4row['o_price']))
                            echo '<div class="OS_price"><div class="OSPH1">'.$q4row['o_price'].'</div> <div class="OSPH2">'.$q4row['o_price_type'].'</div></div>';
                        echo '<div class="OS_pic">';
                        echo '<img src="uploads/offers/img/' . cleanitup($q4row['o_title']) . "/thumbs/thumb_" . $photoRow['oImg_file'] . '" width="95" height="70">';
                        echo '</div>';
                    }

                    echo '</div>';
                    echo '</td>';
                    echo '</tr>';
                } ?>
            </div>
            <?php }?>
                 </table>
        </div>
    <div id="OS_footer"><img src="templates/default/images/top5-footer.png" width="295" height="50" /></div>
</div>